package org.llc.bpmn.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.llc.bpmn.model.po.LeaveApply;
import org.llc.bpmn.service.BpmLeave2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "请假流程示例")
@RestController
@RequestMapping("/bpmLeave")
public class BpmLeave2Controller {

    @Autowired
    BpmLeave2Service bpmLeave2Service;


    @ApiOperation("发起请假流程")
    @PostMapping("/create")
    public void createBpm(String type, LeaveApply leaveApply){
        bpmLeave2Service.createBpm(type, leaveApply);
    }


}
